﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Wwtfly.BBS.ForeModels.Models.Lottery;
using Microsoft.Practices.EnterpriseLibrary.Data;
using System.Data.Common;
using System.Data;
using Wwtfly.DBUtility;

namespace Wwtfly.BBS.ForeDAL.Lottery
{
    /// <summary>
    /// 彩种类型\
    /// </summary>
    public class T_LotteryTypeDAL
    {

        private static readonly string GetT_LotteryTypeList_SQL = "select Id, LotteryID, LotteryName, Descrition from pm_T_LotteryType";

        /// <summary>
        /// 获取 彩种类型 信息
        /// </summary>
        /// <returns></returns>
        public static IList<LotteryTypeModel> GetT_LotteryTypeList()
        {
            Database db = DatabaseFactory.CreateDatabase();
            DbCommand dbCommand = db.GetSqlStringCommand(GetT_LotteryTypeList_SQL);
            using (IDataReader dr = db.ExecuteReader(dbCommand))
            {
                return Emit.ConvertToList<LotteryTypeModel>(dr);
            }

        }
    }
}